package com.zhhtech.zhh.common

import java.util.regex.Pattern

fun String.formatNumber(): String {
    val tmp = StringBuffer().append(this).reverse()
    val retNum: String = Pattern.compile("(\\d{3})(?=\\d)").matcher(tmp.toString()).replaceAll("$1,")
    return StringBuffer().append(retNum).reverse().toString()
}